home *** CD-ROM | disk | FTP | other *** search
/ SVM Mac 1 / CD-ROM N°1.iso / Utilitaires / Programmation⁄Infos / CDEF Pack 1.1 / CDEF Sampler Program ƒ / samplerWindow.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-25  |  1.1 KB  |  73 lines  |  [TEXT/KAHL]

  1. extern SysEnvRec    gMac;
  2.  
  3. /*****
  4.  * samplerWindow.c
  5.  *
  6.  *        The window routines for the Michael Kamprath's CDEF demo
  7.  *
  8.  *      It is based on Symentic's TICK C 5.0 Bullseye demo.
  9.  *
  10.  *****/
  11.  
  12. #include "samplerWindow.h"
  13. #include "samplerControls.h"
  14.  
  15. WindowPtr                samplerWindow;
  16.  
  17. Rect        dragRect;
  18. Rect        windowBounds = { 40, 40, 240, 240 };
  19. Rect        circleStart = {10, 10, 100, 100};
  20. int            width = 5;
  21.  
  22. /****
  23.  * SetUpWindow()
  24.  *
  25.  *    Create the Bullseye window, and open it.
  26.  *
  27.  ****/
  28.  
  29. void SetUpWindow(void)
  30.  
  31. {
  32.  
  33.     dragRect = screenBits.bounds;
  34.  
  35.     if (gMac.hasColorQD)
  36.     {
  37.         samplerWindow = NewCWindow(0L, &windowBounds, "\pCDEF Sampler", 
  38.                                 true, noGrowDocProc, (WindowPtr) -1L, true, 0);
  39.     }
  40.     else
  41.     {
  42.         samplerWindow = NewWindow(0L, &windowBounds, "\pCDEF Sampler", 
  43.                                 true, noGrowDocProc, (WindowPtr) -1L, true, 0);
  44.     }
  45.         
  46.     SetPort(samplerWindow);
  47.     
  48.     MoveTo(5,10);
  49.     TextSize(9);
  50.     DrawString("\pKamprath's CDEF Package Sampler");
  51.     TextSize(12);
  52.     
  53.     SetUpWindowCntls();
  54.     
  55. }
  56. /* end SetUpWindow */
  57.  
  58.  
  59. /*****
  60.  * DrawBullseye()
  61.  *
  62.  *    Draws the bullseye.
  63.  *
  64.  *****/
  65.  
  66. void DrawSampleWindow(short active)
  67.  
  68. {    
  69.     SetPort(samplerWindow);
  70.     
  71.     DrawControls(samplerWindow);
  72. }
  73. /* end DrawBullseye */